﻿#region Header
// ------------------------ Licence / Copyright ------------------------
// 
// ScrumTable for Scrum Meeting Support
// Copyright © HSR - Hochschule für Technik Rapperswil
// All Rights Reserved
// 
// Author:
//  Michael Gfeller Silvan Gehrig Patrick Boos
// 
// ---------------------------------------------------------------------
#endregion

#region Usings

using System;
using ScrumTable.Common.Collections;
using ScrumTable.Common.Data;

#endregion

namespace ScrumTable.DL.Data.Schema.ScrumTableV1
{
    /// <summary>
    /// Specifies an enumeration with the field names of 
    /// the attachment data access object.
    /// </summary>
    public class MetaSchema : SchemaBase
    {
        #region Declarations
        //--------------------------------------------------------------------
        // Declarations
        //--------------------------------------------------------------------

        /// <summary>
        /// Name for the meta field.
        /// </summary>
        /// <remarks>The value must be type of string.</remarks>
        public readonly SchemaBase Name = new NamedSchema(typeof(string), isReadOnly:true);

        /// <summary>
        /// MappedName for the meta field.
        /// </summary>
        /// <remarks>The value must be type of string.</remarks>
        public readonly SchemaBase MappedName = new NamedSchema(typeof(string), isReadOnly: true);
        
        /// <summary>
        /// DisplayName for the meta field.
        /// </summary>
        /// <remarks>The value must be type of string.</remarks>
        public readonly SchemaBase DisplayName = new NamedSchema(typeof(string), isReadOnly: true);

        /// <summary>
        /// Name for the allowedValues meta field.
        /// </summary>
        /// <remarks>The value must be type of object[].</remarks>
        public readonly SchemaBase AllowedValues = new NamedSchema(typeof(object[]), isReadOnly:true);

        /// <summary>
        /// Name for the default value meta field.
        /// </summary>
        /// <remarks>The value must be type of object.</remarks>
        public readonly SchemaBase DefaultValue = new NamedSchema(typeof(object), isReadOnly:true);

        /// <summary>
        /// Name for the data type meta field.
        /// </summary>
        /// <remarks>The value must be type of Type.</remarks>
        public readonly SchemaBase FieldType = new NamedSchema(typeof(Type), isReadOnly: true);

        /// <summary>
        /// Name for the backend data type meta field.
        /// </summary>
        /// <remarks>The value must be type of DataType.</remarks>
        public readonly SchemaBase FieldTypeFormat = new NamedSchema(typeof(DataType), isReadOnly: true);

        /// <summary>
        /// Name for the suggested values meta field.
        /// </summary>
        /// <remarks>The value must be type of object[].</remarks>
        public readonly SchemaBase SuggestedValues = new NamedSchema(typeof(object[]), isReadOnly: true);

        #endregion

        #region Constructors / Destructor
        //--------------------------------------------------------------------
        // Constructors / Destructor
        //--------------------------------------------------------------------

        /// <summary>
        /// Do not create global instances of this class.
        /// </summary>
        internal protected MetaSchema()
        {
            IsSchemaElementReadOnly = true;
        }

        #endregion
    }
}
